import Observer from "./Observer.js"

export default function (target) {
    if (typeof target !== 'object') return
    let ob = null
    if (typeof target.__ob__ !== 'undefined') {
        ob = target.__ob__
    } else {
        ob = new Observer(target)
    }
    return ob
}